// KeyCombinationCommand.java - 按键组合指令
package org.zjx.command.basic;

import lombok.extern.slf4j.Slf4j;
import org.zjx.command.Command;
import org.zjx.core.IWindow;
import org.zjx.state.StateManager;
import org.zjx.util.RobotUtil;

@Slf4j
public class KeyCombinationCommand extends Command {
    private final int[] keyCodes;

    public KeyCombinationCommand(IWindow window, StateManager stateManager,int... keyCodes) {
        super(window, true,stateManager); // 需要激活窗口
        this.keyCodes = keyCodes;
    }

    @Override
    protected void doExecute() throws Exception {
        RobotUtil.getInstance().pressKeyCombination(keyCodes);
    }
}